package com.zhehekeji.opsys.api.webservice.server;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;

import com.zhehekeji.opsys.api.resp.*;
import org.apache.cxf.rs.security.cors.CrossOriginResourceSharing;

/**
 * @ClassName OperationManager
 * @Description 运营管理接口
 * @author chenweiliu chenwei.liu@163.com
 * @date 2015-7-7   下午1:45:05
 */
@Path(value="/")
@WebService
@CrossOriginResourceSharing(allowAllOrigins=true)
public interface OperationManager {
	
	/**
	 * 
	* @Title: getProductList 
	* @Description: 获取产品列表
	* @param cpCode -1获取所有企业的产品列表
	* @param firstIndex
	* @param maxResult
	* @return 
	* @return GetProductListResp 
	* @throws
	 */
	@GET
	@Path(value="getProductList")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetProductList",operationName="getProductList")
    GetProductListResp getProductList(@WebParam(name="cpCode")@QueryParam(value="cpCode")Long cpCode,
                                      @WebParam(name="firstIndex")@QueryParam(value="firstIndex")int firstIndex,
                                      @WebParam(name="maxResult")@QueryParam(value="maxResult")int maxResult);
	
	/**
	 * 
	* @Title: getProductDetail 
	* @Description: 获取产品详情
	* @param productCode
	* @return 
	* @return GetProductDetailResp 
	* @throws
	 */
	@GET
	@Path(value="getProductDetail")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetProductDetail",operationName="getProductDetail")
    GetProductDetailResp getProductDetail(@WebParam(name="productCode")@QueryParam(value="productCode")String productCode);
	
	/**
	 * 
	* @Title: getCategoryDetail 
	* @Description: 获取栏目详情
	* @param categoryCode
	* @return 
	* @return GetCategoryDetailResp 
	* @throws
	 */
	@GET
	@Path(value="getCategoryDetail")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetCategoryDetail",operationName="getCategoryDetail")
    GetCategoryDetailResp getCategoryDetail(@WebParam(name="categoryCode")@QueryParam(value="categoryCode")String categoryCode);
	
	/**
	 * 
	* @Title: getCategoryList 
	* @Description: 获取栏目列表
	* @param categoryCode
	* @param firstIndex
	* @param maxResult
	* @return 
	* @return GetCategoryListResp 
	* @throws
	 */
	@GET
	@Path(value="getCategoryList")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetCategoryList",operationName="getCategoryList")
    GetCategoryListResp getCategoryList(@WebParam(name="cpCode")@QueryParam(value="cpCode")Long cpCode,
                                        @WebParam(name="categoryCode")@QueryParam(value="categoryCode")String categoryCode,
                                        @WebParam(name="firstIndex")@QueryParam(value="firstIndex")int firstIndex,
                                        @WebParam(name="maxResult")@QueryParam(value="maxResult")int maxResult);
	
	/**
	 * 
	* @Title: getContentList 
	* @Description: 获取内容列表
	* @param categoryCode
	* @param firstIndex
	* @param maxResult
	* @return 
	* @return GetContentListResp 
	* @throws
	 */
	@GET
	@Path(value="getContentList")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetContentList",operationName="getContentList")
	GetContentListResp getContentList(@WebParam(name="categoryCode")@QueryParam(value="categoryCode")String categoryCode, 
			@WebParam(name="tag")@QueryParam(value="tag")String tag, 
			@WebParam(name="order")@QueryParam(value="order")String order,
			@WebParam(name="firstIndex")@QueryParam(value="firstIndex")int firstIndex, 
			@WebParam(name="maxResult")@QueryParam(value="maxResult")int maxResult);
	
	/**
	 * 
	* @Title: getContentDetail 
	* @Description: 获取内容详情
	* @param contentCode
	* @param productCode
	* @return 
	* @return GetContentDetailResp 
	* @throws
	 */
	@GET
	@Path(value="getContentDetail")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetContentDetail",operationName="getContentDetail")
    GetContentDetailResp getContentDetail(@WebParam(name="contentCode")@QueryParam(value="contentCode")String contentCode,
                                          @WebParam(name="productCode")@QueryParam(value="productCode")String productCode);
	
	/**
	 * 
	* @Title: getSeriesSubsetList 
	* @Description: 获取连续剧子集
	* @param seriesCode
	* @param firstIndex
	* @param maxResult
	* @return 
	* @return GetContentListResp 
	* @throws
	 */
	@GET
	@Path(value="getSeriesSubsetList")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetSeriesSubsetList",operationName="getSeriesSubsetList")
	GetContentListResp getSeriesSubsetList(@WebParam(name="seriesCode")@QueryParam(value="seriesCode")String seriesCode, 
			@WebParam(name="firstIndex")@QueryParam(value="firstIndex")int firstIndex, 
			@WebParam(name="maxResult")@QueryParam(value="maxResult")int maxResult);
	
	/**
	 * 
	* @Title: getRecommendList 
	* @Description: 获取同一产品下的内容推荐列表
	* @param contentCode
	* @param productCode
	* @param firstIndex
	* @param maxResult
	* @return 
	* @return GetContentListResp 
	* @throws
	 */
	@GET
	@Path(value="getRecommendList")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetRecommendList",operationName="getRecommendList")
	GetContentListResp getRecommendList(@WebParam(name="contentCode")@QueryParam(value="contentCode")String contentCode, 
			@WebParam(name="productCode")@QueryParam(value="productCode")String productCode,
			@WebParam(name="firstIndex")@QueryParam(value="firstIndex")int firstIndex, 
			@WebParam(name="maxResult")@QueryParam(value="maxResult")int maxResult);
	
	@GET
	@Path(value="getScrollmsgList")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetScrollmsgList",operationName="getScrollmsgList")
	GetScrollmsgListResp getScrollmsgList(@WebParam(name="cpCode")@QueryParam(value="cpCode")long cpCode, 
			@WebParam(name="firstIndex")@QueryParam(value="firstIndex")int firstIndex, 
			@WebParam(name="maxResult")@QueryParam(value="maxResult")int maxResult);
	
	@GET
	@Path(value="getScrollmsgDetail")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetScrollmsgDetail",operationName="getScrollmsgDetail")
	GetScrollmsgDetailResp getScrollmsgDetail(@WebParam(name="code")@QueryParam(value="code")String code);
	
	@GET
	@Path(value="getSearchList")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetSearchList",operationName="getSearchList")
	GetContentListResp getSearchList(@WebParam(name="searchWord")@QueryParam(value="searchWord")String searchWord, 
			@WebParam(name="productCode")@QueryParam(value="productCode")String productCode,
			@WebParam(name="firstIndex")@QueryParam(value="firstIndex")int firstIndex, 
			@WebParam(name="maxResult")@QueryParam(value="maxResult")int maxResult);

    @GET
    @Path(value="getChannelList")
    @Produces(value=MediaType.APPLICATION_JSON )
    @WebMethod(action="doGetChannelList",operationName="getChannelList")
	GetChannelListResp getChannelList(@WebParam(name="cpCode")@QueryParam(value="cpCode")Long cpCode, @WebParam(name="zoneCode")@QueryParam(value="zoneCode")String zoneCode, @WebParam(name="firstIndex")@QueryParam(value="firstIndex")int firstIndex, @WebParam(name="maxResult")@QueryParam(value="maxResult")int maxResult);

    @GET
    @Path(value="getSchedProgramList")
    @Produces(value=MediaType.APPLICATION_JSON )
    @WebMethod(action="doGetSchedProgramList",operationName="getSchedProgramList")
	GetChannelSchedProgramListResp getSchedProgramList(@WebParam(name="channelCode")@QueryParam(value="channelCode")String channelCode, @WebParam(name="day")@QueryParam(value="day")String day);
}
